
<script setup>
import { ref } from "vue"
import Form from './components/Form.vue'
// 1. 创建一个null ref数据
const formRef = ref(null)
const clickFn = () => {
  console.log(formRef.value)
  console.log(formRef.value.count)
  formRef.value.validate()
}
</script>

<template>
  <div>
    <Form ref="formRef"></Form>
    <button @click="clickFn">点击获取子组件的数据</button>
  </div>
</template>

